<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">
	<head>
		<title>My Facelets Page</title>
		<meta http-equiv="keywords" content="enter,your,keywords,here" />
		<meta http-equiv="description"
			content="A short description of this page." />
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<style>
		.orders {
   border: thin solid black;
 }

 .ordersHeader {
   text-align: center;
   font-style: italic;
   color: Snow;
   background: Teal;
 }

 .evenColumn {
   height: 25px;
   text-align: center;
   background: MediumTurquoise;
 }

 .oddColumn {
   text-align: center;
   background: PowderBlue;
 }
</style>	
		<!--<link rel="stylesheet" type="text/css" href="styles.css">-->
	</head>
	<body>
		<p>
			<ui:insert name="body"><h1 align="center">h:dataTable Test</h1>
			
			
			<h:dataTable value="#{table.userList}" var="user" border="1" styleClass="orders"
		        headerClass="ordersHeader"
		        rowClasses="evenColumn,oddColumn">
				<h:column>
					<f:facet name="header">用户名</f:facet>
					<h:outputText value="#{user.userName}"></h:outputText>
				</h:column>
				<h:column>
					<f:facet name="header">密码</f:facet>
					<h:outputText value="#{user.password}"></h:outputText>
				</h:column>
				<h:column>
					<f:facet name="header">电话</f:facet>
					<h:outputText value="#{user.tel}"></h:outputText>
				</h:column>
				<h:column>
					<f:facet name="header">地址</f:facet>
					#{user.address}
				</h:column>
			</h:dataTable>
			
			
			</ui:insert>
		</p>
	</body>
</html>
